Multilayer Perceptron Experiments on Sine Wave#
We generated synthetic data using sin(x) function, which we aim to learn. The blue colors are the training set which we will use to train our model. The orange colors are the test set which we will use to check if our model can generalize and did learn the sine function
Our inputs are the x-values (horizontal axis) and our targets are y = sin(x), which we will train our model to predict given x.
We show an animation below of the neural network parameters (MLP) and the evolution of how it fits the data over its training (epochs). We find that while the network fits the training set well, it failed to extend the sine wave function in the test set.